import java.util.Scanner;

//测试类
public class Demo1 {
    public static void main(String[] args) {
        /*课堂练习题1测试
        Circle circle1,circle2;
        circle1 = new Circle();
        circle2 = new Circle(2);
        circle1.getArea();
        circle1.getCircle();
        circle2.getArea();
        circle2.getCircle();
         */
        /*课堂练习2测试
        ... O、T、J、L、I、Z、S
        CellT cellT = new CellT(new Cell(2,2));
        cellT.print();
         */
        /*课堂练习3测试
        指针信息酒店管理系统
         */
        Hotel hotel = new Hotel();
        Scanner console = new Scanner(System.in);
        System.out.println("请输入要执行的操作：in out show exit");
        loop:while (true){
            String input = console.nextLine();
            switch (input) {
                case "in":
                    System.out.print("请输入房间号和住户名字(如：1001 Lucy 123456)：");
                    hotel.residentIn(console.nextInt(), console.next(),console.nextInt());
                    break;
                case "out":
                    System.out.print("请输入要退房的房间号(如：1001 Lucy)：");
                    hotel.residentOut(console.nextInt());
                    break;
                case "show":
                    hotel.show();
                    break;
                case "exit":
                    break loop;
                //也可以用return或者System.exit(0)来退出程序
            }
        }
    }
}